package com.da.springtest.ioc.dependon;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author chenlida
 * @date 2020/6/13 22:35
 * @description
 */
public class TestMethod {
    public static void main(String[] args) {
        System.out.println("容器启动中!");
        String beanXml = "classpath:bean/beanDepend.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(beanXml);
        System.out.println("容器启动完毕，准备关闭spring容器!");
        //关闭容器
        context.close();
        System.out.println("spring容器已关闭!");
    }
}